home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / arexx / toasterpaint / tpepsload.rexx < prev    next >
OS/2 REXX Batch file  |  1995-12-22  |  1KB  |  43 lines

  1. /* TPEpsLoad.rexx -- Load EPS as Brush      */
  2. /* © 1995 NewTek, Inc.    by Bob Caron      */
  3.  
  4. if pos('DigiPaint',show(ports))=0 then do
  5.   exit
  6. end
  7.  
  8. options results
  9.  
  10. Address "DigiPaint"     /* Tell ARexx where commands go  */
  11.  
  12.  'Askf' "Load EPS"
  13.  file=result
  14.  if file="FILE" | file="" then
  15.     file="Toaster:PsFonts"
  16.  if lastpos('/',file,length(file)-1)~=0 then do
  17.     filenam=right(file,(length(file)-lastpos('/',file,length(file)-1)))
  18.     path=left(file,(lastpos('/',file,length(file))-1))
  19.     end
  20.  else do
  21.     filenam=right(file,(length(file)-lastpos(':',file,length(file)-1)))
  22.     path=left(file,(lastpos(':',file,length(file))))
  23.     end
  24.  
  25. width=100
  26. height=100
  27.  
  28.   'Asku'"Select Size:"
  29.   size=translate(result,' ',',abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-_=+\|][{};::/"><,.~`?')
  30.  
  31.   width=word(size,1)
  32.   height=word(size,2)
  33.  
  34.   if width<1 then width=20
  35.   if height<1 then height=20
  36.  
  37. address command "C:psimage "path"/"||value("filenam")||" T:temp.bsh"||" "||value(width)||" "||value("height")||" "
  38.   'Lobr'
  39.   'Fnam'"T:temp.bsh"         /* Enter File name  */
  40.   'Okls'                /* Hit the OK button  */
  41.  
  42. exit
  43.